export default class BaseEntity {

  _assignProperties(data: Object = {}): void {
    if (typeof data !== 'object' || data === null) {
      throw new Error('data must be a object');
    }
    const keys: Array<string> = Object.keys(data);
    keys.forEach((key: string) => this[key] = data[key]);
  }

}